$f(x, y) = \left( 10x + 2y, -2y + 2x \right)$ Find $F$ such that $f = \nabla F$. $F(x, y) =$ $ + \, C$
Solution: We know that $\nabla F = f$. Therefore: $\begin{aligned} F_x &= 10x + 2y \\ \\ F_y &= -2y + 2x \end{aligned}$ Let's integrate these two equations. Instead of getting a constant at the end of each integral, we'll get a function of the variable with respect to which we didn't integrate. [Example] $\begin{aligned} F &= \int F_x \, dx \\ \\ &= \int 10x + 2y \, dx \\ \\ &= 5x^2 + 2xy + H(y) \\ \\ F &= \int F_y \, dy \\ \\ &= \int -2y + 2x \, dy \\ \\ &= -y^2 + 2xy + G(x) \end{aligned}$ Now we can set both ways of writing $F$ equal to find $G$ and $H$. $5x^2 + 2xy + H(y) = -y^2 + 2xy + G(x)$ Therefore: $\begin{aligned} G(x) &= 5x^2 + C_1 \\ \\ H(y) &= -y^2 + C_2 \end{aligned}$ We can write $C_1$ and $C_2$ as a single arbitrary constant $C$ in the final version of $F$. Putting everything together: $F(x, y) = 5x^2 - y^2 + 2xy + C$